package com.example.resource;

import com.example.core.ResultEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@Validated
@Api("微信相关接口")
public class WxResource extends BaseResource {


    @ApiModelProperty("获取openId")
    @GetMapping("getOpenId")
    public ResultEntity getOpenId(@RequestParam String code) {
        weixinService.getOpenId(code);
        return ResultEntity.OK();
    }


}
